/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.pretorius.question4.adpViolation.model.monitorPlatform;

import za.ac.cput.pretorius.question4.adpViolation.model.backupData.BackupData;
import za.ac.cput.pretorius.question4.adpViolation.model.backupData.DataDestinationUART;
import za.ac.cput.pretorius.question4.adpViolation.model.backupData.KeyboardDataSource;
import za.ac.cput.pretorius.question4.adpViolation.model.deviceManager.DeviceManager;
import za.ac.cput.pretorius.question4.adpViolation.model.deviceManager.USB;

/**
 *
 * @author griddy
 */
public class MonitorPlatform {
    
    private BackupData backupData = new BackupData();
    private DeviceManager deviceManager = new DeviceManager();
    
    public String monitorBackup(KeyboardDataSource dataSource,DataDestinationUART dataDestination)
    {
       if( backupData.backupData(dataSource, dataDestination) )
           return "Data Backup Successfull to UART!";
       else
            return "Data Backup Failed!";
    }
    
    public String monitorDeviceStatus(USB device)
    {
        if (deviceManager.isConnected(device))
            return "USB Device Connected!";
        else
            return "USB Device Not Connected!";
    }
    
    public void logActivityToRecord(String data)
    {
        System.out.println("Log Record: "+data);
        
    }
    
    
    
}
